package com.allenkerr.springboot.application;

import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by 小柯(Allen Kerr) on 17/6/3 12:02.
 */
@Controller
@SpringBootApplication
@Configuration
public class HelloApplication {

    @RequestMapping("hello")
    @ResponseBody
    public String hello() {
        return "Hello Spring Boot !";
    }

    @RequestMapping("index")
    public String index() {
        return "index";
    }

    public static void main(String[] args) {
        SpringApplication.run(HelloApplication.class, args);
//        SpringApplication application = new SpringApplication(HelloApplication.class);
//        application.setBannerMode(Banner.Mode.OFF);//关闭banner
//        application.run(args);
    }

}
